from langchain_core.prompts import ChatPromptTemplate

system_chat_prompt = ChatPromptTemplate.from_messages([
    ("system", "你是个AI机器人，根据用户的提问回答,我叫{username}"),
])

human_chat_prompt = ChatPromptTemplate.from_messages([
    ("human", "{query}")
])

chat_promp = system_chat_prompt + human_chat_prompt

print(chat_promp.invoke({"username": "慕小课", "query": "你好，你叫什么名字"}).to_string())
